package com.sneakxy.config;

import javax.sql.DataSource;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.sneakxy.mybatis.commons.repository.config.EnableMybatisCommonsRepositories;

@Configuration
@EnableTransactionManagement
@EnableMybatisCommonsRepositories(basePackages="com.sneakxy.repository")
public class PersistenceConfig {
	
	@Bean
	public DataSourceTransactionManager transactionManager(DataSource dataSource) {
		return new DataSourceTransactionManager(dataSource);
	}
	
}
